package com.itheima.day06;
/*
案例4：二维数组
 */

public class TestClassCase04 {

    public static void main(String[] args) {

        //动态初始化

        int[] arr1={11,22,33};
        int[] arr2={11,22,33};
     //   int[] arr3={11,22,33};
        int[] arr3={11,22,33,44};

        int[][] arr=new int[3][3];

        arr[0]=arr1;
        arr[1]=arr2;
        arr[2]=arr3;

      //  System.out.println(arr[0][1]);


        //错误的访问方法
     //   System.out.println(arr[1][3]);


        System.out.println(arr[2][3]);




        /*
        静态初始化
         */

        int[][] num={{1,2,3},{5,6,7}};

        System.out.println(num[1][2]);


        int[] a={2,4,3};
        int[] b={3,6,1};

        int[][] c={a,b};
        System.out.println(c[1][1]);






    }
}
